import { JSEncrypt } from 'jsencrypt';

export const encryptedData = (data) => {
  let encryptor = new JSEncrypt();
  encryptor.setPublicKey(process.env.VUE_APP_PUBLIC_KEY);
  return encryptor.encrypt(data);
};

const PC_URL = 'https://ke.movtile.com/';

// 暂时干掉吧
export const formatJumpUrl = (obj) => {
  return '';
  if (!obj.targetType) return '';
  switch (obj.targetType) {
    case 'teachers':
      return PC_URL + 'teacher/' + obj.id;
    case 'videos':
      return PC_URL + 'video/' + obj.targetId;
    case 'courses':
      return PC_URL + 'cover/' + obj.targetId;
  }
};
